package com.dayu.sale.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.dayu.common.annotation.Excel;
import com.dayu.common.core.domain.BaseEntity;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 版本3 --- 账单主对象 dy_bill_info
 *
 * @author HK
 * @date 2024-01-10
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class DyBillInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 买家id */
    @Excel(name = "买家id")
    @NotNull(message = "买家不能为空")
    private Long buyerId;

    /** 买家名称 */
    @Excel(name = "买家名称")
    @NotEmpty(message = "买家名称不能为空")
    private String buyerName;

    /** 购买时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "购买时间", width = 30, dateFormat = "yyyy-MM-dd")
    @NotNull(message = "购买时间不能为空")
    private Date buyTime;

    /** 销售金额 */
    @Excel(name = "销售金额")
    private BigDecimal salePrice;

    /** 总成本 */
    @Excel(name = "总成本")
    private BigDecimal costPrice;

    /** 运费 */
    @Excel(name = "运费")
    private BigDecimal freight;

    /** 配件成本 */
    @Excel(name = "配件成本")
    private BigDecimal accCostPrice;

    /** 销售人id */
    @Excel(name = "销售人id")
    @NotNull(message = "销售人不能为空")
    private Long saleUserId;

    /** 销售人名称 */
    @Excel(name = "销售人名称")
    private String saleUserName;

    /** 支付方式 */
    @Excel(name = "支付方式")
    @NotEmpty(message = "支付方式不能为空")
    private String payMethod;

    /** 收款账户 */
    @Excel(name = "收款账户")
    @NotEmpty(message = "收款账户不能为空")
    private String payAccount;

    /** 利润 */
    @Excel(name = "利润")
    private BigDecimal profitPrice;

    /** 状态(1=待审核，2=通过，3=作废) */
    @Excel(name = "状态(1=待审核，2=通过，3=作废)")
    private Integer status;

    /** 审核人id */
    @Excel(name = "审核人id")
    private Long checkUserId;

    /** 审核人名称 */
    @Excel(name = "审核人名称")
    private String checkUserName;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date checkTime;

    @Excel(name = "快递单号")
    private String trackingNumber;

    /*销售商品*/
    @NotEmpty(message = "销售商品不能为空")
    private List<DySaleGoods> goodsList;

    /*销售配件*/
    private List<DySaleParts> partsList;

    @NotEmpty(message = "支付凭证不能为空")
    private String imgUrl;

    /*审核备注*/
    private String checkRemark;

    /*退货数量*/
    private Integer refundNum;

    private Date buyStartTime;

    private Date buyEndTime;
}
